package ast;

import java.util.ArrayList;

public class AndPredicate extends QualityPredicate {

	private ArrayList<QualityPredicate> ops;
	
	public AndPredicate(ArrayList<QualityPredicate> ops)
	{
		this.ops = ops;
	}
	
	public ArrayList<QualityPredicate> getOps()
	{
		return ops;
	}
	
	public void setComponentPredicate(int i, QualityPredicate qp)
	{
		ops.set(i, qp);
	}
	
	public String toString()
	{
		String res = "(";
		for (int i = 0; i < ops.size(); i++) {
			res += ops.get(i).toString();
			if (i != ops.size() - 1)
				res += "&&";
		}
		res += ")";
		
		return res;
	}
}
